package com.gtpickupapp;

import android.app.Activity;
import android.app.LocalActivityManager;
import android.content.Intent;
import android.graphics.LightingColorFilter;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class SearchEvents extends Activity{
	
	
	@Override
	public void onCreate(Bundle savedInstanceState) {        
		super.onCreate(savedInstanceState);        
		setContentView(R.layout.searchevents);
		
		final Button weight = (Button) findViewById(R.id.searchweight);
        weight.getBackground().setColorFilter(new LightingColorFilter(0xFFFFFFFF, 0xC6930A));
        weight.setOnClickListener(new View.OnClickListener() {
        	public void onClick(View v) {
        		Bundle bundle = getIntent().getExtras();	        	
	        	Intent myintent = new Intent(SearchEvents.this, SearchWeight.class);
	        	myintent.putExtras(bundle);
	        	SearchEventsGroup g = SearchEventsGroup.group;
	        	LocalActivityManager la = g.getLocalActivityManager();
	        	View view = la.startActivity("weight",myintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();
	        	SearchEventsGroup.group.replaceView(view);
        		
        	}         
        });
        
        
        final Button run = (Button) findViewById(R.id.searchrunning);
        run.getBackground().setColorFilter(new LightingColorFilter(0xFFFFFFFF, 0xC6930A));
        run.setOnClickListener(new View.OnClickListener() {
        	public void onClick(View v) {
        		Bundle bundle = getIntent().getExtras();	        	
	        	Intent myintent = new Intent(SearchEvents.this, SearchPi.class);
	        	myintent.putExtras(bundle);
	        	SearchEventsGroup g = SearchEventsGroup.group;
	        	LocalActivityManager la = g.getLocalActivityManager();
	        	View view = la.startActivity("pi",myintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();
	        	SearchEventsGroup.group.replaceView(view);
        	}         
        });
        
        final Button sport = (Button) findViewById(R.id.searchsports);
        sport.getBackground().setColorFilter(new LightingColorFilter(0xFFFFFFFF, 0xC6930A));
        sport.setOnClickListener(new View.OnClickListener() {
        	public void onClick(View v) {
        		Bundle bundle = getIntent().getExtras();	        	
	        	Intent myintent = new Intent(SearchEvents.this, SearchSport.class);
	        	myintent.putExtras(bundle);
	        	SearchEventsGroup g = SearchEventsGroup.group;
	        	LocalActivityManager la = g.getLocalActivityManager();
	        	View view = la.startActivity("sport",myintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();
	        	SearchEventsGroup.group.replaceView(view);
        		
        	}         
        });
        
		
	}
	
	
}
